import AMap from 'AMap'
function getGps(gps) {
  const info = new Promise((resolve, reject) => {
    AMap.convertFrom(gps, 'gps', function(status, result) {
      resolve([result.locations[0].lng, result.locations[0].lat])
      reject('error')
    })
  })
  return info.then(function(res) {
    return res
  })
}

export default {
  goapi: 'http://127.0.0.1:2904/',
  geohash: 'http://wx.amstudio.top:2468/database/Geohash',
  getGps
}
